import request from "@/utils/request";


export const pageBanner = (params) => {
  return request({
    method: "POST",
    url: "/api/pc/banner/pageBanner",
    data: params
  });
};

export const getBannerById = (bannerId) => {
  return request({
    method: "GET",
    url: "/api/pc/banner/getBannerById",
    params: { bannerId },
  });
};

export const pageBulletin = (params) => {
  return request({
    method: "post",
    url: "/api/pc/bulletin/pageBulletin",
    data: params,
  });
};

export const pageWorkState = (params) => {
  return request({
    method: "post",
    url: "/api/pc/workState/pageWorkState",
    data: params,
  });
};

export const pagePoliciesRegulations = (params) => {
  return request({
    method: "post",
    url: "/api/pc/policies/pagePoliciesRegulations",
    data: params,
  });
};

export const pageCourtyard = (params) => {
  return request({
    method: "post",
    url: "/api/pc/courtyard/pageCourtyard",
    data: params,
  });
};

export const getCityMap = (params) => {
  return request({
    method: "post",
    url: "/api/pc/courtyard/getCityMap",
    data: params,
  });
};

export const pageProfessor = (params) => {
  return request({
    method: "post",
    url: "/api/pc/professor/pageProfessor",
    data: params,
  });
};

export const pageCourtyardLog = (params) => {
  return request({
    method: "post",
    url: "/api/pc/courtyardLog/pageCourtyardLog",
    data: params,
  });
};

export const pageCourtyardMien = (params) => {
  return request({
    method: "post",
    url: "/api/pc/courtyard/pageCourtyardMien",
    data: params,
  });
};

export const pageScientificResearch = (params) => {
  return request({
    method: "post",
    url: "/api/pc/research/pageScientificResearch",
    data: params,
  });
};

export const getWorkStateById = (params) => {
  return request({
    method: "get",
    url: "/api/pc/workState/getWorkStateById",
    params,
  });
};

export const getBulletinById = (params) => {
  return request({
    method: "get",
    url: "/api/pc/bulletin/getBulletinById",
    params,
  });
};

export const getScientificResearchById = (params) => {
  return request({
    method: "get",
    url: "/api/pc/research/getScientificResearchById",
    params,
  });
};
export const getPoliciesRegulationsById = (params) => {
  return request({
    method: "get",
    url: "/api/pc/policies/getPoliciesRegulationsById",
    params,
  });
};


export const getCourtyardLogById = (params) => {
  return request({
    method: "get",
    url: "/api/pc/courtyardLog/getCourtyardLogById",
    params,
  });
};

// professor
export const getProfessorById = (params) => {
  return request({
    method: "get",
    url: "/api/pc/professor/getProfessorById",
    params,
  });
};

// 农事问答

export const pageQuestionAnswer = (params) => {
  return request({
    method: "post",
    url: "/api/pc/questionAnswer/pageQuestionAnswer",
    data: params,
  });
};

export const saveQuestion = (params) => {
  return request({
    method: "post",
    url: "/api/pc/questionAnswer/saveQuestion",
    data: params,
  });
};

// http://kejixiaoyuan.haimijiaoyu.com/api/file/getTxCosCredential
export const getTxCosCredential = (params) => {
  return request({
    method: "get",
    url: "/api/file/getTxCosCredential",
    params,
  });
};


// http://kejixiaoyuan.haimijiaoyu.com/api/pc/professorMien/pageProfessorMien

export const pageProfessorMien = (params) => {
  return request({
    method: "post",
    url: "/api/pc/professorMien/pageProfessorMien",
    data: params,
  });
};


export const listPostgraduate = (params) => {
  return request({
    method: "post",
    url: "/api/pc/postgraduateInfo/pagePostgraduate",
    data: params,
  });
};


export const getPostgraduate = (params) => {
  return request({
    method: "get",
    url: "/api/pc/postgraduateInfo/getPostgraduate",
    params,
  });
};



export const getIntroduceVo = (params) => {
  return request({
    method: "get",
    url: "/api/pc/courtyard/getIntroduceVo",
    params,
  });
};


export const getCourtyardById = (params) => {
  return request({
    method: "get",
    url: "/api/pc/courtyard/getCourtyardById",
    params,
  });
};

// http://kejixiaoyuan.haimijiaoyu.com/api/pc/information/pageInformation

export const pageInformation = (params) => {
  return request({
    method: "post",
    url: "/api/pc/information/pageInformation",
    data: params,
  });
};


// http://kejixiaoyuan.haimijiaoyu.com/api/pc/questionAnswer/getQuestionAnswerById

export const getQuestionAnswerById = (params) => {
  return request({
    method: "get",
    url: "/api/pc/questionAnswer/getQuestionAnswerById",
    params,
  });
};

// http://kejixiaoyuan.haimijiaoyu.com/api/pc/information/getInformationById

export const getInformationById = (params) => {
  return request({
    method: "get",
    url: "/api/pc/information/getInformationById",
    params,
  });
};


// http://kejixiaoyuan.haimijiaoyu.com/api/pc/postgraduateInfo/register

export const postgraduateInfo = (params) => {
  return request({
    method: "post",
    url: "/api/pc/postgraduateInfo/register",
    data: params,
  });
};

// http://kejixiaoyuan.haimijiaoyu.com/api/pc/postgraduateInfo/updatePostgraduate

export const updatePostgraduate = (params) => {
  return request({
    method: "post",
    url: "/api/pc/postgraduateInfo/updatePostgraduate",
    data: params,
  });
};


// http://kejixiaoyuan.haimijiaoyu.com/api/pc/postgraduateInfo/sendSmsVerifyCode

export const sendSmsVerifyCodeGraduate = (params) => {
  return request({
    method: "get",
    url: "/api/pc/postgraduateInfo/sendSmsVerifyCode",
    params,
  });
};

// http://kejixiaoyuan.haimijiaoyu.com/api/pc/farmer/sendSmsVerifyCode

export const sendSmsVerifyCodeFarmer = (params) => {
  return request({
    method: "get",
    url: "/api/pc/farmer/sendSmsVerifyCode",
    params,
  });
};



// http://kejixiaoyuan.haimijiaoyu.com/api/pc/farmer/register
export const postfarmer = (params) => {
  return request({
    method: "post",
    url: "/api/pc/farmer/register",
    data: params,
  });
};

// http://kejixiaoyuan.haimijiaoyu.com/api/pc/postgraduateInfo/accountLogin
export const accountLogin = (params) => {
  return request({
    method: "post",
    url: "/api/pc/postgraduateInfo/accountLogin",
    data: params,
  });
};

export const getFarmer = (params) => {
  return request({
    method: "get",
    url: "/api/pc/farmer/getFarmer",
    params,
  });
};


export const graduatelogout = (params) => {
  return request({
    method: "get",
    url: "/api/pc/postgraduateInfo/logout",
    params,
  });
};

export const farmerlogout = (params) => {
  return request({
    method: "get",
    url: "/api/pc/farmer/logout",
    params,
  });
};


export const farmaccountLogin = (params) => {
  return request({
    method: "post",
    url: "/api/pc/farmer/accountLogin",
    data: params,
  });
};

// http://kejixiaoyuan.haimijiaoyu.com/api/base/listCity
export const getlistCity = (params) => {
  return request({
    method: "get",
    url: "/api/base/listCity",
    params,
  });
};


// http://kejixiaoyuan.haimijiaoyu.com/api/pc/bulletin/pageIntegratedQuery
export const pageIntegratedQuery = (params) => {
  return request({
    method: "post",
    url: "/api/pc/bulletin/pageIntegratedQuery",
    data: params,
  });
};


// http://kejixiaoyuan.haimijiaoyu.com/api/pc/postgraduateInfo/updatePasswordByPhone
export const updatePasswordByPhoneGraduateInfo = (params) => {
  return request({
    method: "post",
    url: "/api/pc/postgraduateInfo/updatePasswordByPhone",
    data: params,
  });
};

// http://kejixiaoyuan.haimijiaoyu.com/api/pc/farmer/updatePasswordByPhone
export const updatePasswordByPhoneFarm = (params) => {
  return request({
    method: "post",
    url: "/api/pc/farmer/updatePasswordByPhone",
    data: params,
  });
};


// http://kejixiaoyuan.haimijiaoyu.com/api/pc/farmer/sendSmsVerifyCode

// http://kejixiaoyuan.haimijiaoyu.com/api/pc/farmer/updateFarmer
export const updateFarmer = (params) => {
  return request({
    method: "post",
    url: "/api/pc/farmer/updateFarmer",
    data: params,
  });
};


// http://kejixiaoyuan.haimijiaoyu.com/api/pc/courtyardLog/countCourtyardLogByPostgraduateId
export const countCourtyardLogByPostgraduateId = (params) => {
  return request({
    method: "post",
    url: "/api/pc/courtyardLog/countCourtyardLogByPostgraduateId",
    data: params,
  });
};


// http://kejixiaoyuan.haimijiaoyu.com/api/pc/courtyardLog/pageCourtyardLogByPostgraduateId
export const pageCourtyardLogByPostgraduateId = (params) => {
  return request({
    method: "post",
    url: "/api/pc/courtyardLog/pageCourtyardLogByPostgraduateId",
    data: params,
  });
};

// 获取农事问答列表
// http://kejixiaoyuan.haimijiaoyu.com/api/pc/forum/searchForumComment
export const searchForum = (params) => {
  return request({
    method: "post",
    url: "/api/pc/forum/searchForum",
    data: params,
  });
}

export const searchForumComment = (params) => {
  return request({
    method: "post",
    url: "/api/pc/forum/searchForumComment",
    data: params,
  });
}

// http://kejixiaoyuan.haimijiaoyu.com/api/pc/researchType/listFirstType

export const listFirstType = (params) => {
  return request({
    method: "get",
    url: "/api/pc/researchType/listFirstType",
    params,
  });
};

// http://kejixiaoyuan.haimijiaoyu.com/api/pc/researchType/listSecondaryType
export const listSecondaryType = (params) => {
  return request({
    method: "get",
    url: "/api/pc/researchType/listSecondaryType",
    params,
  });
};

// /pc/forum/getForumById
export const getForumById = (params) => {
  return request({
    method: "get",
    url: "/api/pc/forum/getForumById",
    params,
  });
};

export const saveForum = (params) => {
  return request({
    method: "post",
    url: "/api/pc/forum/saveForum",
    data: params,
  });
}

// http://kejixiaoyuan.haimijiaoyu.com/api/pc/forum/saveForum